package com.xc.sbdemo.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotEmpty;
import java.io.Serializable;
import java.util.Date;
@Data
@ApiModel("电影实体")
public class Movie implements Serializable {
    @TableId(value = "movieId",type = IdType.AUTO)
    @ApiModelProperty("电影ID")
    private Integer movieId;
    @ApiModelProperty("电影名称")
    @NotEmpty(message = "电影名称不能为空")
    @TableField("movieName")
    private String movieName;
    @NotEmpty(message = "电影类型不能为空")
    @TableField("movieType")
    private String movieType;
    private Double price;
    private Integer recommend;
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @TableField("startTime")
    private Date startTime;
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @TableField("endTime")
    private Date endTime;
    private Integer votes;

}
